home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-11-29 | 1.2 KB | 47 lines | [TEXT/MPS ] |
- UNIT CodeSizeLimits;
- {-------------------------------------------}
- (*
- ©1988 by Steve Seaquist. All rights reserved.
- Used by permission. Use at your own risk.
- No warranty is expressed or implied.
-
- This Macintosh virus-detecting program was
- originally published and explained in the
- February 1989 issue of MacTutor magazine.
- Some aspects of its design are important to
- security, and it uses some unusual
- techniques, so please read the article.
- *)
- {-------------------------------------------}
- INTERFACE
-
- VAR
- gJTSize: INTEGER;
- gEntryPoint: LONGINT;
- gSizeLimit:
- ARRAY [0..8] OF LONGINT;
- gMaxCode: INTEGER;
-
- PROCEDURE GetCodeSizeLimits;
-
- {*******************************************}
- IMPLEMENTATION
- PROCEDURE zzSecurityPatrol; EXTERNAL;
- {-------------------------------------------}
- PROCEDURE GetCodeSizeLimits;
- BEGIN
- gEntryPoint := ORD4(@zzSecurityPatrol)+$1A;
- gJTSize := 1240;
- gMaxCode := 8;
- gSizeLimit[0] := gJTSize + 16;
- gSizeLimit[1] := 15700;
- gSizeLimit[2] := 23900;
- gSizeLimit[3] := 11200;
- gSizeLimit[4] := 00844;
- gSizeLimit[5] := 01908;
- gSizeLimit[6] := 01606;
- gSizeLimit[7] := 01822;
- gSizeLimit[8] := 01312;
- END;
- {*******************************************}
- END.